package org.wanho.service.impl;

import org.wanho.dao.UserDao;
import org.wanho.dao.impl.UserDaoImpl;
import org.wanho.entity.User;
import org.wanho.service.UserService;

import java.util.List;

/**
 * Author：汤小洋
 * Date：2024-12-03 15:00
 * Description：<描述>
 */
public class UserServiceImpl implements UserService {

    private UserDao userDao = new UserDaoImpl();

    @Override
    public void add(User user) {
        userDao.insert(user);
    }

    @Override
    public List<User> findAll() {
        return userDao.selectAll();
    }

    @Override
    public void removeById(int id) {
        userDao.deleteById(id);
    }
}
